---

## NEXUS
nexus_version: 3.68.0-04
nexus_host: 0.0.0.0
nexus_port: 8081
nexus_docker_enable: true
nexus_npm_enable: true
nexus_nuget_enable: true
nexus_pypi_enable: true
nexus_raw_enable: true
nexus_composer_enable: true
nexus_blobstores_split: true

nexus_jvm_custom_options:
  - -Dlog4j2.formatMsgNoLookups=true

nexus_agents_config:
  - name: "newrelic"
    download_url: "http://download.newrelic.com/newrelic/java-agent/newrelic-agent/current/newrelic-java.zip"
    version: "6.4.1"
    vm_opts:
      - -javaagent:{{ nexus_installation_path }}/newrelic/newrelic.jar
    configuration_files:
      - "newrelic.yml"
    params: {
      application_name: "application_sample_name",
      license_key: "sddsasd"
    }
  - name: "datadog"
    download_url: "https://github.com/DataDog/dd-trace-java/releases/download/v0.73.0/dd-java-agent-0.73.0.jar"
    version: "0.73.0"
    vm_opts:
      - -javaagent:{{ nexus_installation_path }}/datadog/dd-java-agent-0.73.0.jar
      - -Ddd.profiling.enabled=true
      - -Ddd.logs.injection=true
      - -Ddd.service=sample
      - -Ddd.env=molecule
    configuration_files: []

nexus_jmx_enabled: true

nexus_ldap_authentication: true

nexus_admin_password: nexus

nexus_roles:
  - id: Developer
    name: developer
    description: All developers
    privileges:
      - nx-search-read
    roles: []
  - id: Deployer
    name: deployer
    description: All deployers
    privileges:
      - nx-repository-admin-*-*-*
    roles:
      - Developer

nexus_users:
  - username: jenkins
    first_name: Jenkins
    last_name: CI
    email: support@company.com
    password: s3cr3t
    roles:
      - Deployer

nexus_realms:
  - name: NuGetApiKey
    enabled: false

nexus_scheduled_tasks:
  - name: compact-blobstore
    cron: '0 0 22 * * ?'
    typeId: blobstore.compact
    taskProperties:
      blobstoreName: blob-mvn

nexus_cleanup_policies:
  - name: test
    format: maven2
    notes: Remove maven snapshots older than 30 days
    criteria:
      published_before: 100
      last_download_before: 30
      is_pre_release: false
  - name: test2
    format: all
    notes: Remove all
    criteria:
      published_before: 23
      last_download_before: 54

nexus_repositories_maven:
  proxy:
    - name: maven-central
      remote_url: https://repo1.maven.org/maven2/
      layout_policy: permissive
      clean_policy: test2
    - name: maven-jboss
      remote_url: https://repository.jboss.org/nexus/content/groups/public-jboss/
      clean_policy: test2
  hosted:
    - name: maven-snapshots
      version_policy: snapshot
      write_policy: allow
      clean_policy: test
    - name: maven-releases
      version_policy: release
      write_policy: allow_once
      clean_policy: test
  group:
    - name: maven-public
      member_repos:
        - maven-central
        - maven-jboss
        - maven-snapshots
        - maven-releases

nexus_repositories_docker:
  proxy:
    - name: docker-proxy
      http_port: "{{ nexus_docker_proxy_port }}"
      v1_enabled: True
      index_type: HUB
      proxy_url: https://registry-1.docker.io
      use_nexus_certificates_to_access_index: false
      clean_policy: None
  hosted:
    - name: docker-hosted
      http_port: "{{ nexus_docker_hosted_port }}"
      v1_enabled: True
      clean_policy: None
      latest_policy: True
  group:
    - name: docker-public
      http_port: "{{ nexus_docker_group_port }}"
      v1_enabled: True
      member_repos:
        - docker-hosted
        - docker-proxy
      clean_policy: None

nexus_repositories_npm:
  proxy:
    - name: npm-proxy
      remote_url: https://registry.npmjs.org
      clean_policy: None
  hosted:
    - name: npm-hosted
      clean_policy: None
  group:
    - name: npm-public
      member_repos:
        - npm-hosted
        - npm-proxy
      clean_policy: None

## NUGET
nexus_repositories_nuget:
  proxy:
    - name: nuget.org-proxy
      remote_url: https://www.nuget.org/api/v2/
      clean_policy: None
  hosted:
    - name: nuget-hosted
      clean_policy: None
  group:
    - name: nuget-public
      member_repos:
        - nuget.org-proxy
        - nuget-hosted
      clean_policy: None

nexus_repositories_pypi:
  proxy:
    - name: pypi-proxy
      remote_url: https://pypi.python.org/
      clean_policy: None
  hosted:
    - name: pypi-hosted
      clean_policy: None
  group:
    - name: pypi-public
      member_repos:
        - pypi-proxy
        - pypi-hosted
      clean_policy: None

nexus_repositories_raw:
  proxy:
    - name: raw-proxy
      remote_url: https://example.org/
      clean_policy: None
  hosted:
    - name: raw-hosted
      clean_policy: None
  group:
    - name: raw-public
      member_repos:
        - raw-proxy
        - raw-hosted
      clean_policy: None

## COMPOSER
nexus_repositories_composer:
  plugin_version: 0.0.29
  proxy:
    - name: composer-proxy
      remote_url: https://packagist.org/
      clean_policy: None
  hosted:
    - name: composer-hosted
      clean_policy: None
  group:
    - name: composer-public
      member_repos:
        - composer-hosted
        - composer-proxy
      clean_policy: None
